#include "Command.h"
#include "Scene.h"

namespace FinalRendering
{
	namespace Editor
	{
		Command::Command()
		{
			Cancelled = false;
		}

		void CompoundCommand::PerformAction(Scene * scene)
		{
			for (int i=0; i<commands.Count(); i++)
				commands[i]->PerformAction(scene);
		}

		void CompoundCommand::UndoAction(Scene * scene)
		{
			for (int i=commands.Count()-1; i>=0; i--)
			{
				commands[i]->UndoAction(scene);
			}
		}
	}
}